exception TDatabaseErrorException
{
	1: string message,
}

exception TWrongUserDataException
{
	1: string message,
}

exception TDecryptErrorException
{
	1: string message,
}

exception TEmailSendingException
{
	1: string message,
}

exception TFileOperationException
{
	1: string message,
}

exception TDirectoryOperationException
{
	1: string message,
}

struct ThriftUser
{
	1: string userName,
	2: string userPassword,
}

struct ThriftFile
{
	1: string owner,
	2: string fileName,
	3: i32 fileVersion,
	4: string directoryName,
}

struct ThriftDirectory
{
	1: string owner,
	2: string directoryName,
	3: string parrentDirectory,
}

service ThriftService
{
	void logonUser(1:ThriftUser thriftUser) throws (1:TWrongUserDataException ue, 2:TDatabaseErrorException dbe),
	void deleteUser(1:ThriftUser thriftUser) throws (1:TWrongUserDataException ue, 2:TDatabaseErrorException dbe),	
	void changePassword(1:ThriftUser thriftUser, 2:string newPassword) throws (1:TWrongUserDataException ue, 2:TDatabaseErrorException bde),
	void registerUser(1:ThriftUser thriftUser) throws (1:TDecryptErrorException dce, 2:TWrongUserDataException ue, 3:TDatabaseErrorException dbe, 4:TEmailSendingException eme),
	void forgotPassword(1:ThriftUser thriftUser, 2:string newPassword) throws (1:TDecryptErrorException dce, 2:TWrongUserDataException ue, 3:TDatabaseErrorException dbe, 4:TEmailSendingException eme),
	
	
	i64 getFileSize(1: ThriftFile thriftFile) throws (1:TFileOperationException fe, 2:TDatabaseErrorException dbe),
	i64 getFileUploadDate(1: ThriftFile thriftFile) throws (1:TFileOperationException fe, 2:TDatabaseErrorException dbe),
	void deleteFile(1: ThriftFile thriftFile) throws (1:TFileOperationException fe, 2:TDatabaseErrorException dbe),
	i32 getLastFileVersion(1: ThriftFile thriftFile) throws (1:TFileOperationException fe, 2:TDatabaseErrorException dbe),
	void deleteAllFileVersions(1: ThriftFile thriftFile) throws (1:TFileOperationException fe, 2:TDatabaseErrorException dbe),
	list<i32> getFileVersionNumbers(1: ThriftFile thriftFile) throws (1:TFileOperationException fe, 2:TDatabaseErrorException dbe),
	list<string> getFilesFromDirectory(1:ThriftDirectory thriftDirectory) throws (1:TDatabaseErrorException dbe),
	
	
	void createDirectory(1:ThriftDirectory thriftDirectory) throws (1:TDirectoryOperationException dre, 2:TDatabaseErrorException dbe),
	void deleteDirectory(1:ThriftDirectory thriftDirectory) throws (1:TDirectoryOperationException dre, 2:TDatabaseErrorException dbe),
	list<string> getDirectoriesFromDirectory(1:ThriftDirectory thriftDirectory) throws (1:TDatabaseErrorException dbe),
	ThriftDirectory getBaseDirectory(1:string owner),
	void setSyncDirectory(1:ThriftDirectory thriftDirectory) throws (1:TDatabaseErrorException dbe),
	ThriftDirectory getSyncDirectory(1:string owner) throws (1:TDatabaseErrorException dbe, 2:TWrongUserDataException ue),
	
}